function selectALL(){
		  //查询
		  var type3=$("#type3").val();//起始时间
		  var type4=$("#type4").val();//结束时间
		  var start = new Date(type3.replace("-", "/").replace("-", "/"));
		  var end = new Date(type4.replace("-", "/").replace("-", "/"));
		  if(start>end){
			  layer.alert("起始时间不能大于结束时间");
			  return;
		  }else{
			  layui.use('table', function(){
				  var table = layui.table;
				  table.reload('test', {
					  where: { //设定异步数据接口的额外参数，任意设
					   /*  type2:type2, */
					    type3:type3,
					    type4:type4,
					  }
					  //,page: {
					   // curr: 1 //重新从第 1 页开始
					  //}
					});
			});	
		  }
		  //layer.alert(type1);
		
		
	}
  
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  //日期
  laydate.render({
    elem: '#type3'
  });
  laydate.render({
    elem: '#type4'
  });
});
$(function(){
	init();
})
function init(){
	layui.use('table', function(){
		  var table = layui.table;
		  table.render({
			  height: 20
		  });
	});	
}
function table(type,id){
	  if(type==0){
		  x_admin_show('查看订单详情','orderDetails.do?type='+type+'&id='+id,600,400)
	  }else {
		  layer.confirm("确认要删除吗，删除后不能恢复", { title: "删除确认" }, function (index) {
            $.post("memberOrderDelete.do?id="+id, function (data) {
            	if(data.type==1){
            		layer.msg("操作成功");
            		setTimeout(function(){
                        //刷新
                        location.reload();
                    },1000);
            	}else{
            		layer.msg("操作失败");
            		setTimeout(function(){
                        //刷新
                        location.reload();
                    },1000);
            	}

            },"json");
        }); 
	  }

}